<template>
	<div>
		<el-dialog title="查看详情" width="800px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
			<table class="table table-bordered" align="center" width="100%" style="word-break:break-all; margin-bottom:50px;  font-size:13px;">
				<tbody>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_id')}}：</td>
						<td>
							{{form.id}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_Id')}}：</td>
						<td>
							{{form.Id}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_MaterialNumber')}}：</td>
						<td>
							{{form.MaterialNumber}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_MaterialName')}}：</td>
						<td>
							{{form.MaterialName}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_Specification')}}：</td>
						<td>
							{{form.Specification}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_UnitNumber')}}：</td>
						<td>
							{{form.UnitNumber}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_UnitName')}}：</td>
						<td>
							{{form.UnitName}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_StockNumber')}}：</td>
						<td>
							{{form.StockNumber}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_StockName')}}：</td>
						<td>
							{{form.StockName}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_CreateTime')}}：</td>
						<td>
							{{form.CreateTime}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_CreateUser')}}：</td>
						<td>
							{{form.CreateUser}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_Isflot')}}：</td>
						<td>
							{{form.Isflot}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_MaterialGroupNumber')}}：</td>
						<td>
							{{form.MaterialGroupNumber}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_MaterialGroupName')}}：</td>
						<td>
							{{form.MaterialGroupName}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Material_Conversion')}}：</td>
						<td>
							{{form.Conversion}}
						</td>
				 </tr>
				</tbody>
			</table>
		</el-dialog>
	</div>
</template>
<script>
import { detail  } from '@/api/app/material'
export default {
	name:'materialdetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{
			},
		}
	},
	watch:{
		show(val){
			if(val){
			}
		}
	},
	methods: {
		open(){
			detail(this.info).then(res => {
				this.form = res.data
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
